#include "parser.h"

Parser *
parser_create (void *opaque,void(*destructor)(void*), FILE* in) {
    Parser *p;
    p = g_new0 (Parser, 1);
    if (!p) return NULL;
    p->opaque = opaque;
    p->f = in;
    p->destructor = destructor;
    return p;
}

void
parser_destory (Parser *p) {
    g_free (p);
}